﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SocialShare.BusinessEntities;
using SocialShare.BusinessLogicLayer;

namespace SocialShare.DAL.Facades
{
    public class SiteContentFacade
    {
        private SocailShare_Site_ContentsBLL cmsBll = null;
        public SiteContentFacade(){}

        private SocailShare_Site_ContentsBLL ContentsInstance
        {
            get
            {
                if (cmsBll == null)
                {
                    return cmsBll = new SocailShare_Site_ContentsBLL();
                }
                else
                {
                    return cmsBll;
                }
            }

        }


        public SocailShare_Site_Contents GetSite_ContentsByCmsId(int cmsId)
        {
            return this.ContentsInstance.GetSocailShare_Site_ContentsByCmsId(cmsId);
        }

        public void UpdateSite_Contents(SocailShare_Site_Contents cms)
        {
            this.ContentsInstance.UpdateSocailShare_Site_Contents(cms);
        }

        public SocailShare_Site_Contents GetSite_ContentsByCmsType(string cmsType)
        {
            return this.ContentsInstance.GetSite_ContentsByCmsType(cmsType);
        }

        [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public List<SocailShare_Site_Contents> GetAllSiteContents()
        {
            return this.ContentsInstance.GetAllSocailShare_Site_Contents();
        }
    }
}
